Skip to content

Update smartstring requirement from 1.0 to 2.0 - #1422

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/cargo/smartstring-2.0
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/cargo/smartstring-2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Updates the requirements on smartstring to permit the latest version.

Changelog

Sourced from smartstring's changelog.

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[1.0.1] - 2022-03-24

FIXED

  • To avoid an issue where allocated heap memory may be deallocated with a different layout alignment than it was officially allocated with when converting between std::string::String and SmartString, even if otherwise correctly aligned, the respective From implementations now use std::alloc::Allocator::grow() to re-align the heap data as necessary. An unfortunate consequence of this is that because the std::alloc::Allocator API hasn't been stabilised yet, unless you're on nightly or some future stable rustc version after allocator_api has been stabilised, converting between String and SmartString will always reallocate and copy (making it always O(n) rather than O(1) when correctly aligned and O(n) otherwise). (#28)

[1.0.0] - 2022-02-24

CHANGED

  • smartstring now implements its own boxed string type rather than deferring directly to String, so it no longer makes assumptions it shouldn't be making about the layout of the String struct.

    This also allows us to organise the boxed struct in a way that will let us rely only on our basic assumption that heap memory is word aligned on both big and little endian architectures. The most immediate consequence of this is that smartstring will now compile on 32-bit big endian architectures such as mips.

    We are now also explicitly allocating heap memory aligned for u16 rather than u8, ensuring the assumption about pointer alignment becomes an invariant.

    In short: smartstring no longer relies on undefined behaviour, and should be safe to use anywhere.

  • The above means that the boxed SmartString is no longer pointer compatible with String, so if you were relying on that despite the documentation urging you not to, you'll really have to stop it now. Converting between SmartString and String using From and Into traits is still efficient and allocation free.

  • The minimum supported rustc version is now 1.57.0.

  • The smartstring::validate() function has been removed, as it's no longer needed.

[0.2.10] - 2022-02-20

... (truncated)

Commits

@dependabot dependabot Bot added enhancement Improvement of existing features or bugfix k::dependencies Pull requests that update a dependency file rust Related to Rust specifically labels Nov 6, 2026
@dependabot
dependabot Bot force-pushed the dependabot/cargo/smartstring-2.0 branch 3 times, most recently from 48619b3 to dbad7b3 Compare November 9, 2026 05:07
Updates the requirements on [smartstring](https://github.com/bodil/smartstring) to permit the latest version.
- [Release notes](https://github.com/bodil/smartstring/releases)
- [Changelog](https://github.com/bodil/smartstring/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/smartstring/commits)

---
updated-dependencies:
- dependency-name: smartstring
  dependency-version: 2.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/cargo/smartstring-2.0 branch from dbad7b3 to a4dc0cc Compare November 9, 2026 06:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of existing features or bugfix k::dependencies Pull requests that update a dependency file rust Related to Rust specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants